.\"
.\" CopyLeft (c) 2015 -tclover <tokiclover@gmail.com>
.\"
.\" Distributed under the terms of the 2-clause BSD License as
.\" stated in the COPYING file that comes with the source files
.\"
.pc
.TH MKINITRAMFS-LL 8 "2015-05-28" "0.21.0" "System Manager's Manual"
.SH NAME
mkinitramfs-ll \- tool for building initramfs
.SH DESCRIPTION
.B mkinitramfs-ll
is an initramfs building script. It requires
.IR mkinitramfs-ll.conf
configuration file and the associated
`\fIinit\fR' script file and `\fIusr\fR' (USRDIR)
directory to complete the task. Those two requirements are not
.IR scrictly
necessary, but are
.IR necessary
to build a
.IR functionnal
initramfs.

It also require `/lib/modules/$KV' kernel object directory along with its
`modules.dep' file, or else, no kernel module would be added. Fonts should
be available in `/usr/share/consolefonts'; Keymaps in `/usr/share/keymaps';
splash Themes in `/etc/splash'; Firmwares in `/lib/firmware'; Binaries in `$PATH';
Or else, use full path to file instead.

Aything can be bundled directly in USRDIR for convenience for the end user.
However, it's useless to waste disk space if the files are available in a live system.
Editing the configuration file should suffice in most cases.

If executed without arguments, an initramfs would be build for the current kernel
with the default options defined in the configuration file.
See the configuration file for more info.
.SH SYNOPSIS
.br
.B mkinitramfs-ll
.RB [\| OPTIONS \| ]

.br
.B mkinitramfs-ll
.RB [\| \-a|\-\-all \|]
.RB [\| \-f|\-\-font=REGEX \|]\|]
.RB [\| \-F|\-\-firmware=REGEX \|]\|]
.RB [\| \-k|\-\-kernel-version=VERSION \|]
.RB [\| \-c|\-\-compressor=COMP \|]
.RB [\| \-L|\-\-luks \]
.RB [\| \-l|\-\-lvm \]
.RB [\| \-b|\-\-bin=BINS \|]\|]
.RB [\| \-d|\-\-usrdir=DIRECTORY \|]
.RB [\| \-g|\-\-gpg \|]
.RB [\| \-p|\-\-prefix=initrd- \|]
.RB [\| \-H|\-\-hook=REGEX \|]
.RB [\| \-m|\-\-module=REGEX \|]
.RB [\| \-\-module-tuxonice=REGEX \|]
.RB [\| \-\-module-remdev=REGEX \|]
.RB [\| \-\-module-squashd=REGEX \|]
.RB [\| \-\-module-gpg=REGEX \|]
.RB [\| \-\-module-boot=REGEX \|]
.RB [\| \-s|\-\-splash=THEMES \|]
.RB [\| \-t|\-\-toi \|]
.RB [\| \-q|\-\-squashd \|]
.RB [\| \-r|\-\-rebuild \|]
.RB [\| \-y|\-\-keymap=REGEX \|]
.RB [\| \-K|\-\-keep-tmpdir \|]

.br
.B mkinitramfs-ll
.RB [\| \-?|\-h|\-\-help \|]

The following conventions apply to
.B SYNOPSIS
section and can be applied to the command line arguments.
.TS
tab (@);
l lx.
\fIitalic text\fR@T{
Replace with appropriate argument.
T}
[\|\fB\-short\fR|\fB\-\-long\fR\|]@T{
Any or all argument within [ ] are optional; and short or long option can be used.
T}
\fIREGEX\fR@T{
Replace regex with a regular expression, matching regex will be performed.
T}
\fBUSRDIR\fR@T{
Refer to `usr' directory (in `/' of the source files or DATADIR/mkinitramfs-ll/usr)
T}
.TE

.SH OPTIONS
.TP
.B \-a|\-\-all
Short variant or form of `\-\-font=: \-\-keymap=: \-\-luks \-\-lvm \-\-gpg
\-\-hook='btrfs zfs zram' \-\-toi \-\-squashd'
.TP
.B \-f|\-\-font=\fIREGEX\fR
Include a list of fonts either a full path or a regular expression name
relative to `/usr/share/consolefonts' (or nothing would be included)
.TP
.B \-F|\-\-firmware=\fIREGEX\fR
Include a list of firmware either a full path or a regular expression name
relative to `/lib/firmware' (or nothing would be included)
(`:' would add the whole firmware directoy)
.TP
.B \-k|\-\-kernel-version=\fIVERSION\fR
Kernel version to use when building an initramfs
.TP
.B \-c|\-\-compressor=\fICOMP\fR
Compressor to use for compression or `none' for uncompressed initramfs
.TP
.B \-L|\-\-luks
Enable dm-crypt LUKS support (require cryptsetup)
.TP
.B \-l|\-\-lvm
Enable device-mapper support (require lvm2)
.TP
.B \-b|\-\-bin=\fIBINS\fR
Include a list of binary to the initramfs
.TP
.B \-d|\-\-usrdir=\fIDIRECTORY\fR
Sse the appended directory as (USRDIR) `usr' directory
.TP
.B \-g|\-\-gpg
Enable GnuPG support (require gnupg-1.4.x)
.TP
.B \-p|\-\-prefix=initrd-
Use `initrd-' prefix to name initramfs
.TP
.B \-H|\-\-hook=\fIREGEX\fR
Include alist of hooks or scripts to the initramfs
.TP
.B \-m|\-\-module=\fIREGEX\fR
Include a list of kernel module to the initramfs
.TP
.B \-\-mtuxonice=\fIREGEX\fR
Append a list of kernel module to tuxonice group
.TP
.B \-\-module-remdev=\fIREGEX\fR
Append a list of kernel module to remdev group
.TP
.B \-\-module-squashd=\fIREGEX\fR
Append a list of kernel module to remdev group
.TP
.B \-\-module-gpg=\fIREGEX\fR
Append a list of kernel module to gpg group
.TP
.B \-\-module-boot=\fIREGEX\fR
Append a list of kernel module to boot group
.TP
.B \-s|\-\-splash=\fITHEMES\fR
Include a list of splash theme (require splashutils)
.TP
.B \-t|\-\-toi
Enable TuxOnIce support (require tuxonice-userui for splash)
.TP
.B \-r|\-\-rebuild
Rebuild an initramfs from an existant directory
.TP
.B \-y|\-\-keymap=\fIREGEX\fR
.br
Include a list of console keymap either a full path or regular expression name
relative to `/usr/share/keymaps' (or nothing would be included)
.TP
.B \-K|\-\-keep-tmpdir
Keep the temporary build directory
.TP
.B \-?|\-h|\-\-help
Print the help message and exit
.TP
.B RAID (FAKE ATA & SOFWARE)
Just append the appropriate binary, that is
.IR dmraid
or
.IR mdadm
with `-b|--bin' switch,
to enable either dm-raid (fake ATA RAID) or mdadm software RAID
.TP
.B HOOKS & USER SCRIPTS
Any hook or script should be in `USRDIR/../hooks', so `-H|--hook' switch would
rightly add any appended hook (if any.) If module group and binary group
are defined in the configuration file, the binaries, kernel modules and module
group would be added.
.TP
.B BTRFS, BCACHE, ZFS & ZRAM SUPPORT
To enable support for any of either bcache, btrfs, zfs & zram,
append `-H|--hook' with a colon separated list of hooks (`-H$HOOKS'.)
.SH EXAMPLES
.TP
.BI mkinitramfs-ll\ \-\-all\ \-\-font=ter-g12n\ \-\-keymap=fr\ \-\-firmware='nouveau/nv108\ iwlwifi-5000'\ \-\-kv=3.14.26-git
Build an initramfs with
.B GnuPG, LUKS, LVM2,
.B BTRFS, ZFS,
.B zram, AUFS|OverlayFS+SquashFS support for
linux kernel 3.14.26-git; nVidia and iwlWIFI-5000 firmwares are included as well.
.SH ENVIRONMENTS
.TP
.B MIR_EXTRA_ENV
This environment variable would be used, if set, to generate the environment
variables of
.IR init
script.
.SH FILES
.TP
.RB @SYSCONFDIR@/mkinitramfs-ll.conf
mkinitramfs-ll configuration file.
.TP
.RB @DATADIR@/mkinitramfs-ll/usr\ (USRDIR)
mkinitramfs-ll `\fIusr\fR' directory that contains extra files
(e.g. `\fIfunctions\fR' library file) for initramfs.
.TP
.RB USRDIR/../init
(initramfs) init script
.TP
.RB USRDIR/../scripts/minimal.applets
busybox minimal applet list (compatibility)
.SH "SEE ALSO"
.BR mkinitramfs-ll (1)
.SH AUTHORS
-tclover <tokiclover@mkinitramfs-ll.project>
.\"
.\" vim:fenc=utf-8:ft=groff:ci:pi:sts=2:sw=2:ts=2:expandtab:
.\"
